import { BasicColumn } from '/@/components/Table'

export const Columns: BasicColumn[] = [
    {
        title: 'ID',
        dataIndex: '_id',
    },
    {
        title: '标题',
        dataIndex: 'title',
    },
    {
        title: '分类',
        dataIndex: 'category',
        slots: { customRender: 'category' },
    },
    {
        title: '作者',
        dataIndex: 'uid',
        slots: { customRender: 'uid' },
    },
    {
        title: '封面',
        dataIndex: 'cover',
        slots: { customRender: 'cover' },
    },
    {
        title: '播放量',
        dataIndex: 'lookNum',
        slots: { customRender: 'lookNum' },
    },
    {
        title: '审核状态',
        dataIndex: 'status',
        slots: { customRender: 'status' },
    },
]

export const FormConfig = {
    labelWidth: 100,
    schemas: [
        {
            field: 'title',
            label: '视频标题:',
            component: 'Input',
            componentProps: {
                placeholder: '请输入视频标题',
            },
            colProps: {
                xl: 8,
                xxl: 6,
            },
        },
        {
            field: '_id',
            label: '视频编号:',
            component: 'Input',
            componentProps: {
                placeholder: '请输入视频编号',
            },
            colProps: {
                xl: 8,
                xxl: 6,
            },
        },
    ],
}
